﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Communication
{
    public class BedControl:ControlBase
    {
        string mReset = "MV17";
        string mRock = "MV16";
        public BedControl()
        {
            mCanId = Can.TRANSPORT_INCUBATION_ID;
            mSubCanId = Can.TRANSPORT_INCUBATION_ID_1;
            mStatus = -1;
            mSCmd = new Dictionary<int, string>();
            mSCmd.Add(0, mReset);
            mSCmd.Add(1, mRock);

        }
        /// <summary>
        /// 复位
        /// </summary>
        /// <returns>0</returns>
        public int Reset()
        {
            SendCmd(0,mReset);
            mStatus = -100;
            return 0;
        }

        /// <summary>
        /// 孵育床摇晃
        /// </summary>
        /// <returns>1</returns>
        public void Rock()
        {
            SendCmd(1, mRock);
           
        }
        /// <summary>
        /// 停止摇晃
        /// </summary>
        /// <returns></returns>
        public int StopRock()
        {
            Can.SendCan(mSubCanId, "1ST" + Can.strEnd);
            mStatus = -1;
            return 1;
        }
    }
}
